/* 结算页整体布局 */
.checkout-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9f4ff; /* 淡紫色背景 */
    border-radius: 5px;
}

/* 步骤指示器 */
.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e6d5ff; /* 淡紫色分隔线 */
}

.step {
    padding: 0 25px;
    position: relative;
    color: #7a5a9a; /* 中等紫色 */
    font-size: 16px;
    font-weight: 500;
}

.step.active {
    color: #5a3d7a; /* 深紫色 */
    font-weight: 600;
}

.step.active:after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: #9c6ade; /* 紫色指示条 */
}

/* 两栏布局 */
.checkout-layout {
    display: flex;
    gap: 30px;
}

/* 左侧表单区域 */
.checkout-form {
    flex: 2;
}

.section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #e6d5ff; /* 淡紫色边框 */
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #5a3d7a; /* 深紫色标题 */
    padding-bottom: 10px;
    border-bottom: 1px solid #f0e5ff; /* 淡紫色分隔线 */
}

/* 表单元素样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #5a3d7a; /* 深紫色文字 */
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e6d5ff; /* 淡紫色边框 */
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
    background-color: #fdfaff; /* 非常淡的紫色背景 */
}

.form-control:focus {
    border-color: #9c6ade; /* 紫色聚焦边框 */
    outline: none;
    background-color: white;
}

/* 支付方式 */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.payment-method {
    border: 1px solid #e6d5ff; /* 淡紫色边框 */
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fdfaff; /* 非常淡的紫色背景 */
}

.payment-method.selected {
    border-color: #9c6ade; /* 紫色选中边框 */
    background: #f8f2ff; /* 淡紫色背景 */
    box-shadow: 0 0 0 2px rgba(156, 106, 222, 0.2);
}

.payment-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

/* 右侧订单摘要 */
.order-summary {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 25px;
    position: sticky;
    top: 20px;
    border: 1px solid #e6d5ff; /* 淡紫色边框 */
}

.order-items {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0e5ff; /* 淡紫色分隔线 */
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #f0e5ff; /* 淡紫色边框 */
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 14px;
    margin-bottom: 5px;
    color: #5a3d7a; /* 深紫色文字 */
}

.item-price {
    font-size: 15px;
    color: #9c6ade; /* 紫色价格 */
    font-weight: 500;
}

/* 订单总计 */
.order-totals {
    margin-top: 20px;
    border-top: 1px solid #f0e5ff; /* 淡紫色分隔线 */
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
    color: #5a3d7a; /* 深紫色文字 */
}

.total-row.final {
    font-size: 17px;
    font-weight: 600;
    color: #5a3d7a; /* 深紫色文字 */
    margin-top: 15px;
}

/* 提交按钮 */
.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #9c6ade; /* 紫色按钮 */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 20px;
}

.checkout-btn:hover {
    background: #8a5acd; /* 深一点的紫色 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .checkout-layout {
        flex-direction: column;
    }
    
    .payment-methods {
        grid-template-columns: 1fr 1fr;
    }
    
    .order-summary {
        position: static;
    }
}

/* 表单验证提示 */
.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.has-error .error-message {
    display: block;
}

.has-error .form-control {
    border-color: #e74c3c;
}